package com.aftersale.demo.Utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/*
 *@Author  空
 *@Date    2023/10/11 16:41
 *@Desc
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Result {
    public static final String success_code="200";
    public static final String error_code="401";

    private String code;
    private String msg;
    private Object data;
    public static Result success(){
        return new Result(success_code,"请求成功",null);
    }
    public static Result success(Object data){
        return new Result(success_code,"请求成功",data);
    }
    public static  Result error(String msg){
        return new Result(error_code,msg,null);
    }
}
